package com.project.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 销售明细实体类
 */
@ApiModel(value = "销售明细实体类",description = "封装销售订单中各商品的价格数量等信息")
@TableName("t_saleDetail")
public class SaleDetailBean {
    /**编号**/
    @ApiModelProperty("编号")
    @TableId("pk_sDetailId")
    private Integer id;
    /**销售订单编号**/
    @ApiModelProperty("销售订单编号")
    @TableField("fk_saleId")
    private Integer saleId;
    /**商品编号**/
    @ApiModelProperty("商品编号")
    @TableField("fk_productId")
    private String productId;
    @TableField(exist = false)
    /**商品对象**/
    @ApiModelProperty(hidden = true)
    private ProductBean product;
    @TableField("sd_price")
    /**销售价格**/
    @ApiModelProperty("销售价格")
    private Integer price;
    /**销售数量**/
    @ApiModelProperty("销售数量")
    @TableField("sd_num")
    private Integer num;

    public SaleDetailBean() {
    }

    public SaleDetailBean(Integer saleId, String productId, Integer price, Integer num) {
        this.saleId = saleId;
        this.productId = productId;
        this.price = price;
        this.num = num;
    }



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSaleId() {
        return saleId;
    }

    public void setSaleId(Integer saleId) {
        this.saleId = saleId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "SaleDetailBean{" +
                "id=" + id +
                ", saleId=" + saleId +
                ", productId=" + productId +
                ", product=" + product +
                ", price=" + price +
                ", num=" + num +
                "}\n";
    }
}
